<?php 
require_once (__DIR__ . "/../../models/Products.php");
$results = Products::GetAll();

?>
				<a href="<?= "$rootUrl/../W/Products/create" ?>"><b>Add...</b></a>
				<table class="table table-bordered table-condensed table-hover table-striped">
					<tr>
						<th>Name</th><th>Category</th><th>Num In Stock</th><th>Actions</th>
					</tr>
					
					<?php while($row = $results->fetch_assoc()): ?>
						<tr>
							<td><?php echo $row['name']; ?></td> <td><?php echo keywords::GetName($row['category']);?> </td><td><?php echo $row['numInStock'];?> </td>
							<td>
								<a href="<?= "$rootUrl/../W/Products/details/$row[id]"; ?>">Details</a>
								<a href="<?= "$rootUrl/../W/Products/edit/$row[id]"; ?>">Edit</a>
								<a href="<?= "$rootUrl/../W/Products/delete/$row[id]"; ?>">Delete</a>
							</td>					
						</tr>
					<?php endwhile; ?>
					
				</table>